﻿using System.Windows.Forms;
using System;
namespace MMSSync.Entities
{
    /// <summary>
    /// Extended class for TreeNode
    /// </summary>
    /// <seealso cref="System.Windows.Forms.TreeNode" />
    public class TreeNodeItem : TreeNode
    {
        /// <summary>
        /// Term Status
        /// </summary>
        public enum Status
        {
            New = 0,
            Error = 1
        }

        /// <summary>
        /// The label
        /// </summary>
        private string label;

        /// <summary>
        /// The unique identifier
        /// </summary>
        private Guid? guid;

        /// <summary>
        /// Gets or sets the term label.
        /// </summary>
        /// <value>
        /// The term label.
        /// </value>
        /// 
        public string TermLabel
        {
            get
            {
                return label;
            }

            set
            {
                base.Text = label = value;
            }
        }

        /// <summary>
        /// Gets or sets the term unique identifier.
        /// </summary>
        /// <value>
        /// The term unique identifier.
        /// </value>
        public Guid? TermGuid
        {
            get
            {
                return guid;
            }

            set
            {                
                guid = value;
                base.ToolTipText = base.Name = guid.ToString();
            }
        }

        /// <summary>
        /// Gets or sets the additional flag.
        /// </summary>
        /// <value>
        /// The additional flag.
        /// </value>
        public string AdditionalFlag { get; set; }

        /// <summary>
        /// Gets or sets the term status.
        /// </summary>
        /// <value>
        /// The term status.
        /// </value>
        public Status TermStatus { get; set; }

    }
}
